<template>
  <div>
    <el-menu
        :default-active="activeIndex2"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b">
      <el-menu-item
          style="margin: 0;"
          index="1">
        <div class="block">
          <el-image
              style="width: 100px;height: 50px"
              :src="url"
              fit="scale-down"></el-image>
        </div>
      </el-menu-item>
      <el-menu-item index="/mmm">处理中心</el-menu-item>
      <el-submenu index="2">
        <template slot="title">我的工作台</template>
        <el-menu-item index="/nnn">选项1</el-menu-item>
        <!--          <el-menu-item index="2-3">选项3</el-menu-item>-->
        <!--          <el-submenu index="2-4">-->
        <!--            <template slot="title">选项4</template>-->
        <!--            <el-menu-item index="2-4-1">选项1</el-menu-item>-->
        <!--            <el-menu-item index="2-4-2">选项2</el-menu-item>-->
        <!--            <el-menu-item index="2-4-3">选项3</el-menu-item>-->
        <!--          </el-submenu>-->
      </el-submenu>
      <!--        <el-menu-item index="3">消息中心</el-menu-item>-->
      <el-menu-item style="float: right">
        <el-dropdown>
            <span class="el-dropdown-link">
              <el-image
                  style="width: 40px;height: 40px;"
                  :src="url"
                  fit="scale-down"></el-image>
              <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>我的订单</el-dropdown-item>
            <el-dropdown-item>基本信息</el-dropdown-item>
            <el-dropdown-item>退出登录</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "WebMenu",
  data() {
    return {
      activeIndex: '1',
      activeIndex2: '1',
      url: ''
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      this.$router.push({path: key})
    }
  }
}
</script>

<style scoped>

</style>